package com.bangdream.michelia.view.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.bangdream.michelia.R;

import java.util.ArrayList;
import java.util.List;

/**
 * @date on 2018/8/10 23:42
 * @email 909732184@qq.com
 * 任务-报名的列表适配器
 */
public class TaskQrderAdapter extends RecyclerView.Adapter {
    private Context context;
    private LayoutInflater layoutInflater;
    private List<String> data = new ArrayList<>();
    private OnItemClickListener onItemClickListener;

    public OnItemClickListener getOnItemClickListener() {
        return onItemClickListener;
    }

    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
        this.onItemClickListener = onItemClickListener;
    }

    public interface OnItemClickListener{
        void onQrderItemClick(int position);
    }
    public TaskQrderAdapter(Context context) {
        this.context = context;
        layoutInflater = LayoutInflater.from(context);
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = layoutInflater.inflate(R.layout.task_order_adapter_item,parent,false);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        //return data==null?0:data.size();
        return 5;
    }

    class ViewHolder extends RecyclerView.ViewHolder{
        private TextView tvNumber;
        private TextView tvMoney;
        private TextView tvTitle;
        private TextView tvStudyNumber;
        private TextView tvTime;
        private ImageView ivLogo;
        public ViewHolder(View itemView) {
            super(itemView);
        }
    }
}
